import autoprefixer from 'autoprefixer';
import postCssPxToRem from "postcss-pxtorem";
export const createCssConfig = (): { [key: string]: any } => ({
  preprocessorOptions: {
    scss: {
      additionalData: `@use "@/styles/variable.scss" as *;`,
    },
  },
  postcss: {
    plugins: [
      postCssPxToRem({
        // 这里的rootValue就是你的设计稿大小
        rootValue: 37.5,
        propList: ['*'],
      }),
      autoprefixer({
        overrideBrowserslist: [
          'Android 4.1',
          'iOS 7.1',
          'ff > 31',
          'Chrome > 69',
          'ie >= 8',
          '> 1%'
        ]
      }),
    ],
  },
});
